package org.jypj.dev.vo.indexVo;

import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ChenYu on 2017-06-15.
 */
public class IRoad {

    private String id;//即loginID
    private String roadId;//roadId
    private String roadName;//交路名称
    private String trainWorkJson;//车次工序的json
    private List<ITrainUserWork> trainUserWorkList = new ArrayList<>();

    //==首页搜索显示使用
    private String trainCodeStr;//车次字符串
    private String userName;//用户名
    private String userNum;//用户名
    private String trainNum;//车组号

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRoadId() {
        return roadId;
    }

    public void setRoadId(String roadId) {
        this.roadId = roadId;
    }

    public String getRoadName() {
        return roadName;
    }

    public void setRoadName(String roadName) {
        this.roadName = roadName;
    }

    public String getTrainWorkJson() {
        return trainWorkJson;
    }

    public void setTrainWorkJson(String trainWorkJson) {
        this.trainWorkJson = trainWorkJson;
    }

    public List<ITrainUserWork> getTrainUserWorkList() {
        return trainUserWorkList;
    }

    public void setTrainUserWorkList(List<ITrainUserWork> trainUserWorkList) {
        this.trainUserWorkList = trainUserWorkList;
    }

    public String getTrainCodeStr() {
        return trainCodeStr;
    }

    public void setTrainCodeStr(String trainCodeStr) {
        this.trainCodeStr = trainCodeStr;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserNum() {
        return userNum;
    }

    public void setUserNum(String userNum) {
        this.userNum = userNum;
    }

    public String getTrainNum() {
        return trainNum;
    }

    public void setTrainNum(String trainNum) {
        this.trainNum = trainNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        IRoad iRoad = (IRoad) o;

        return roadId.equals(iRoad.roadId);
    }

    @Override
    public int hashCode() {
        return roadId.hashCode();
    }

    @Override
    public String toString() {

        return new Gson().toJson(this);
    }
}
